package com.wisecoach.gatewayplus.spring.boot.autoconfigure;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.HashSet;
import java.util.Set;

/**
 * {@code @author:} wisecoach
 * {@code @date:} 2023/6/15 下午4:18
 * {@code @version:} 1.0.0
 */
@Data
@ConfigurationProperties(GatewayPlusTxProperties.prefix)
public class GatewayPlusTxProperties {

    public static final String prefix = "fabric.gatewayplus.tx";

    private Set<String> channels = new HashSet<>();

    private LockedTxProperties lockedTx = new LockedTxProperties();

    @Data
    public static class LockedTxProperties {
        public static final String prefix = "fabric.gatewayplus.tx.lockedtx";

        private Integer maxRetry = 5;
        private Integer retryInterval = 200;
    }

    // private List<String> channelsWithTx;
    //
    // public List<String> getChannelsWithTx() {
    //     return channelsWithTx;
    // }
    //
    // public void setChannelsWithTx(List<String> channelsWithTx) {
    //     this.channelsWithTx = channelsWithTx;
    // }
}
